package com.spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.spring.model.Dwzjson;

@Controller
public class UserController {
	
	@ResponseBody
	@RequestMapping(value={"/dwzajax"})
	public Dwzjson dwzajax(){
		 return new Dwzjson("200","success","","","","","");
	}
	
	@RequestMapping(value={"/dialog1"},method=RequestMethod.GET)
	public String dialog1(){
		return "dialog1";
	}
	
	@ResponseBody
	@RequestMapping(value={"/dialog1"},method=RequestMethod.POST)
	public Dwzjson dialog1(String username){
		return new Dwzjson("200","success","navtab1","","closeCurrent","","");
	}
	
	@RequestMapping(value={"/navtab1"},method=RequestMethod.GET)
	public String navtab1(){
		return "navtab1";
	}
	
	@ResponseBody
	@RequestMapping(value={"/navtab1"},method=RequestMethod.POST)
	public Dwzjson navtab1(String username){
		return new Dwzjson("200","successed","navtab1","","","","");
	}
	
	@RequestMapping(value={"/info"})
	public String info(){
		return "info";
	}
	
	@RequestMapping(value={"/forward1"},method=RequestMethod.GET)
	public String forward1(){
		return "forward1";
	}
	
	@ResponseBody
	@RequestMapping(value={"/forward1"})
	public Dwzjson forward1(String username){
		return new Dwzjson("200","successed","","","forward","info","");
	}
	
	@ResponseBody
	@RequestMapping(value={"/timeout"})
	public Dwzjson timeout(){
		return new Dwzjson("301", "relogin", "", "", "", "", "");
	}
	
	@RequestMapping(value={"/login"})
	public String login(String username,String password,Model model){
		return "login";
	}
	
}
